package com.phelon.epdm;

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import org.apache.commons.lang.StringUtils;

import com.phelon.Global.AS400.Factory;

/**
 * @author pdanfy
 */

public class ItemRevisionB {
	public static void main(String[] args) {
		ItemRevisionB testRev = new ItemRevisionB("A  ", "ASP9802536", "      ");
		try {
			testRev.retrieveRecord("7T");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.exit(0);
	}
	private String site;
	private String item;
	private String revision;
	private String costTechniqueCode;
	private String currentCostStatusCode;	
	private String currentManufacturingOverheadLowerLevels;	
	private String currentManufacturingOverheadTableCode;
	private String currentManufacturingOverheadThisLevel;	
	private String currentManufacturingOverheadThisLevelDateLastMaintained;
	private String currentMaterialLowerLevels;
	private String currentMaterialThisLevel;
	private String currentMaterialThisLevelDateLastMaintained;
	private String currentOther1LowerLevels;
	private String currentOther1ThisLevel;
	private String currentOther1ThisLevelDateLastMaintained;
	private String currentOther2LowerLevels;
	private String currentOther2ThisLevel;
	private String currentOther2ThisLevelDateLastMaintained;
	private String currentOther3LowerLevels;
	private String currentOther3ThisLevel;
	private String currentOther3ThisLevelDateLastMaintained;
	private String currentOther4LowerLevels;
	private String currentOther4ThisLevel;
	private String currentOther4ThisLevelDateLastMaintained;
	private String currentOutsideOperationsLowerLevels;
	private String currentOutsideOperationsThisLevel;
	private String currentOutsideOperationsThisLevelDateLastMaintained;
	private String currentPurchaseOverheadLowerLevels;
	private String currentPurchaseOverheadTableCode;
	private String currentPurchaseOverheadThisLevel;
	private String currentRunLaborLowerLevels;	
	private String currentRunLaborTableCode;	
	private String currentRunLaborThisLevel;
	private String currentRunLaborThisLevelDateLastMaintained;
	private String currentRunMachineLowerLevels;	
	private String currentRunMachineThisLevel;
	private String currentRunMachineThisLevelDateLastMaintained;
	private String currentSetupCostLot;
	private String currentSetupLaborLowerLevels;	
	private String currentSetupLaborTableCode;	
	private String currentSetupLaborThisLevel;
	private String currentSetupLaborThisLevelDateLastMaintained;
	private String currentSetupMachineLowerLevels;	
	private String currentSetupMachineThisLevel;
	private String currentSetupMachineThisLevelDateLastMaintained;				
    private String currentUnitCost;
    private String laborHours;
    private String lastCurrentCostedDate;
    private String lastStandardCostedDate;
    private String methodCurrentCostsLastGenerated;
    private String methodStandardCostsLastGenerated;
    private String recostFlag;
	private String standardCostStatusCode;	
	private String standardLotSize;
	private String standardManufacturingOverheadLowerLevels;	
	private String standardManufacturingOverheadTableCode;
	private String standardManufacturingOverheadThisLevel;	
	private String standardManufacturingOverheadThisLevelDateLastMaintained;
	private String standardMaterialLowerLevels;
	private String standardMaterialThisLevel;
	private String standardMaterialThisLevelDateLastMaintained;
	private String standardOther1LowerLevels;
	private String standardOther1ThisLevel;
	private String standardOther1ThisLevelDateLastMaintained;
	private String standardOther2LowerLevels;
	private String standardOther2ThisLevel;
	private String standardOther2ThisLevelDateLastMaintained;
	private String standardOther3LowerLevels;
	private String standardOther3ThisLevel;
	private String standardOther3ThisLevelDateLastMaintained;
	private String standardOther4LowerLevels;
	private String standardOther4ThisLevel;
	private String standardOther4ThisLevelDateLastMaintained;
	private String standardOutsideOperations;
	private String standardOutsideOperationsLowerLevels;
	private String standardOutsideOperationsThisLevel;
	private String standardOutsideOperationsThisLevelDateLastMaintained;
	private String standardPurchaseOverheadLowerLevels;
	private String standardPurchaseOverheadTableCode;
	private String standardPurchaseOverheadThisLevel;
	private String standardRunLaborLowerLevels;	
	private String standardRunLaborTableCode;	
	private String standardRunLaborThisLevel;
	private String standardRunLaborThisLevelDateLastMaintained;
	private String standardRunMachineLowerLevels;	
	private String standardRunMachineThisLevel;
	private String standardRunMachineThisLevelDateLastMaintained;
	private String standardSetupCostLot;
	private String standardSetupLaborLowerLevels;	
	private String standardSetupLaborTableCode;	
	private String standardSetupLaborThisLevel;
	private String standardSetupLaborThisLevelDateLastMaintained;
	private String standardSetupMachineLowerLevels;	
	private String standardSetupMachineThisLevel;
	private String standardSetupMachineThisLevelDateLastMaintained;				
    private String standardUnitCost;
	private String userFieldAmount1;
	private String userFieldCurrencyA;
	private String userFieldDate1;
	private String userFieldSwitchA;
	private String userFieldSwitchB;
	private String userFieldSwitchC;
	private String userFieldCodeA;
	private String userFieldCodeB;
	private String userFieldCodeC;
	private String userFieldQuantity1;
	private String userFieldText25;
	private String userFieldText40;
	
	public ItemRevisionB(String site, String item, String revision) {
		this.site = site;
		this.item = item;
		this.revision = revision;
	}

	public String getCostTechniqueCode() {
		return costTechniqueCode;
	}

	public String getCurrentCostStatusCode() {
		return currentCostStatusCode;
	}

	public String getCurrentManufacturingOverheadLowerLevels() {
		return currentManufacturingOverheadLowerLevels;
	}

	public String getCurrentManufacturingOverheadTableCode() {
		return currentManufacturingOverheadTableCode;
	}

	public String getCurrentManufacturingOverheadThisLevel() {
		return currentManufacturingOverheadThisLevel;
	}

	public String getCurrentManufacturingOverheadThisLevelDateLastMaintained() {
		return currentManufacturingOverheadThisLevelDateLastMaintained;
	}

	public String getCurrentMaterialLowerLevels() {
		return currentMaterialLowerLevels;
	}

	public String getCurrentMaterialThisLevel() {
		return currentMaterialThisLevel;
	}

	public String getCurrentMaterialThisLevelDateLastMaintained() {
		return currentMaterialThisLevelDateLastMaintained;
	}

	public String getCurrentOther1LowerLevels() {
		return currentOther1LowerLevels;
	}

	public String getCurrentOther1ThisLevel() {
		return currentOther1ThisLevel;
	}

	public String getCurrentOther1ThisLevelDateLastMaintained() {
		return currentOther1ThisLevelDateLastMaintained;
	}

	public String getCurrentOther2LowerLevels() {
		return currentOther2LowerLevels;
	}

	public String getCurrentOther2ThisLevel() {
		return currentOther2ThisLevel;
	}

	public String getCurrentOther2ThisLevelDateLastMaintained() {
		return currentOther2ThisLevelDateLastMaintained;
	}

	public String getCurrentOther3LowerLevels() {
		return currentOther3LowerLevels;
	}

	public String getCurrentOther3ThisLevel() {
		return currentOther3ThisLevel;
	}

	public String getCurrentOther3ThisLevelDateLastMaintained() {
		return currentOther3ThisLevelDateLastMaintained;
	}

	public String getCurrentOther4LowerLevels() {
		return currentOther4LowerLevels;
	}

	public String getCurrentOther4ThisLevel() {
		return currentOther4ThisLevel;
	}

	public String getCurrentOther4ThisLevelDateLastMaintained() {
		return currentOther4ThisLevelDateLastMaintained;
	}

	public String getCurrentOutsideOperationsLowerLevels() {
		return currentOutsideOperationsLowerLevels;
	}

	public String getCurrentOutsideOperationsThisLevel() {
		return currentOutsideOperationsThisLevel;
	}

	public String getCurrentOutsideOperationsThisLevelDateLastMaintained() {
		return currentOutsideOperationsThisLevelDateLastMaintained;
	}

	public String getCurrentPurchaseOverheadLowerLevels() {
		return currentPurchaseOverheadLowerLevels;
	}

	public String getCurrentPurchaseOverheadTableCode() {
		return currentPurchaseOverheadTableCode;
	}

	public String getCurrentPurchaseOverheadThisLevel() {
		return currentPurchaseOverheadThisLevel;
	}

	public String getCurrentRunLaborLowerLevels() {
		return currentRunLaborLowerLevels;
	}

	public String getCurrentRunLaborTableCode() {
		return currentRunLaborTableCode;
	}

	public String getCurrentRunLaborThisLevel() {
		return currentRunLaborThisLevel;
	}

	public String getCurrentRunLaborThisLevelDateLastMaintained() {
		return currentRunLaborThisLevelDateLastMaintained;
	}

	public String getCurrentRunMachineLowerLevels() {
		return currentRunMachineLowerLevels;
	}

	public String getCurrentRunMachineThisLevel() {
		return currentRunMachineThisLevel;
	}

	public String getCurrentRunMachineThisLevelDateLastMaintained() {
		return currentRunMachineThisLevelDateLastMaintained;
	}

	public String getCurrentSetupCostLot() {
		return currentSetupCostLot;
	}

	public String getCurrentSetupLaborLowerLevels() {
		return currentSetupLaborLowerLevels;
	}

	public String getCurrentSetupLaborTableCode() {
		return currentSetupLaborTableCode;
	}

	public String getCurrentSetupLaborThisLevel() {
		return currentSetupLaborThisLevel;
	}

	public String getCurrentSetupLaborThisLevelDateLastMaintained() {
		return currentSetupLaborThisLevelDateLastMaintained;
	}

	public String getCurrentSetupMachineLowerLevels() {
		return currentSetupMachineLowerLevels;
	}

	public String getCurrentSetupMachineThisLevel() {
		return currentSetupMachineThisLevel;
	}

	public String getCurrentSetupMachineThisLevelDateLastMaintained() {
		return currentSetupMachineThisLevelDateLastMaintained;
	}

	public String getCurrentUnitCost() {
		return currentUnitCost;
	}

	public String getItem() {
		return item;
	}

	public String getLaborHours() {
		return laborHours;
	}

	public String getLastCurrentCostedDate() {
		return lastCurrentCostedDate;
	}

	public String getLastStandardCostedDate() {
		return lastStandardCostedDate;
	}

	public String getMethodCurrentCostsLastGenerated() {
		return methodCurrentCostsLastGenerated;
	}

	public String getMethodStandardCostsLastGenerated() {
		return methodStandardCostsLastGenerated;
	}

	public String getRecostFlag() {
		return recostFlag;
	}

	public String getRevision() {
		return revision;
	}

	public String getSite() {
		return site;
	}

	public String getStandardCostStatusCode() {
		return standardCostStatusCode;
	}

	public String getStandardLotSize() {
		return standardLotSize;
	}

	public String getStandardManufacturingOverheadLowerLevels() {
		return standardManufacturingOverheadLowerLevels;
	}

	public String getStandardManufacturingOverheadTableCode() {
		return standardManufacturingOverheadTableCode;
	}

	public String getStandardManufacturingOverheadThisLevel() {
		return standardManufacturingOverheadThisLevel;
	}

	public String getStandardManufacturingOverheadThisLevelDateLastMaintained() {
		return standardManufacturingOverheadThisLevelDateLastMaintained;
	}

	public String getStandardMaterialLowerLevels() {
		return standardMaterialLowerLevels;
	}

	public String getStandardMaterialThisLevel() {
		return standardMaterialThisLevel;
	}

	public String getStandardMaterialThisLevelDateLastMaintained() {
		return standardMaterialThisLevelDateLastMaintained;
	}

	public String getStandardOther1LowerLevels() {
		return standardOther1LowerLevels;
	}

	public String getStandardOther1ThisLevel() {
		return standardOther1ThisLevel;
	}

	public String getStandardOther1ThisLevelDateLastMaintained() {
		return standardOther1ThisLevelDateLastMaintained;
	}

	public String getStandardOther2LowerLevels() {
		return standardOther2LowerLevels;
	}

	public String getStandardOther2ThisLevel() {
		return standardOther2ThisLevel;
	}

	public String getStandardOther2ThisLevelDateLastMaintained() {
		return standardOther2ThisLevelDateLastMaintained;
	}

	public String getStandardOther3LowerLevels() {
		return standardOther3LowerLevels;
	}

	public String getStandardOther3ThisLevel() {
		return standardOther3ThisLevel;
	}

	public String getStandardOther3ThisLevelDateLastMaintained() {
		return standardOther3ThisLevelDateLastMaintained;
	}

	public String getStandardOther4LowerLevels() {
		return standardOther4LowerLevels;
	}

	public String getStandardOther4ThisLevel() {
		return standardOther4ThisLevel;
	}

	public String getStandardOther4ThisLevelDateLastMaintained() {
		return standardOther4ThisLevelDateLastMaintained;
	}

	public String getStandardOutsideOperations() {
		return standardOutsideOperations;
	}

	public String getStandardOutsideOperationsLowerLevels() {
		return standardOutsideOperationsLowerLevels;
	}

	public String getStandardOutsideOperationsThisLevel() {
		return standardOutsideOperationsThisLevel;
	}

	public String getStandardOutsideOperationsThisLevelDateLastMaintained() {
		return standardOutsideOperationsThisLevelDateLastMaintained;
	}

	public String getStandardPurchaseOverheadLowerLevels() {
		return standardPurchaseOverheadLowerLevels;
	}

	public String getStandardPurchaseOverheadTableCode() {
		return standardPurchaseOverheadTableCode;
	}

	public String getStandardPurchaseOverheadThisLevel() {
		return standardPurchaseOverheadThisLevel;
	}

	public String getStandardRunLaborLowerLevels() {
		return standardRunLaborLowerLevels;
	}

	public String getStandardRunLaborTableCode() {
		return standardRunLaborTableCode;
	}

	public String getStandardRunLaborThisLevel() {
		return standardRunLaborThisLevel;
	}

	public String getStandardRunLaborThisLevelDateLastMaintained() {
		return standardRunLaborThisLevelDateLastMaintained;
	}

	public String getStandardRunMachineLowerLevels() {
		return standardRunMachineLowerLevels;
	}

	public String getStandardRunMachineThisLevel() {
		return standardRunMachineThisLevel;
	}

	public String getStandardRunMachineThisLevelDateLastMaintained() {
		return standardRunMachineThisLevelDateLastMaintained;
	}

	public String getStandardSetupCostLot() {
		return standardSetupCostLot;
	}

	public String getStandardSetupLaborLowerLevels() {
		return standardSetupLaborLowerLevels;
	}

	public String getStandardSetupLaborTableCode() {
		return standardSetupLaborTableCode;
	}

	public String getStandardSetupLaborThisLevel() {
		return standardSetupLaborThisLevel;
	}

	public String getStandardSetupLaborThisLevelDateLastMaintained() {
		return standardSetupLaborThisLevelDateLastMaintained;
	}

	public String getStandardSetupMachineLowerLevels() {
		return standardSetupMachineLowerLevels;
	}

	public String getStandardSetupMachineThisLevel() {
		return standardSetupMachineThisLevel;
	}

	public String getStandardSetupMachineThisLevelDateLastMaintained() {
		return standardSetupMachineThisLevelDateLastMaintained;
	}

	public String getStandardUnitCost() {
		return standardUnitCost;
	}

	public String getUserFieldAmount1() {
		return userFieldAmount1;
	}

	public String getUserFieldCodeA() {
		return userFieldCodeA;
	}

	public String getUserFieldCodeB() {
		return userFieldCodeB;
	}

	public String getUserFieldCodeC() {
		return userFieldCodeC;
	}

	public String getUserFieldCurrencyA() {
		return userFieldCurrencyA;
	}

	public String getUserFieldDate1() {
		return userFieldDate1;
	}

	public String getUserFieldQuantity1() {
		return userFieldQuantity1;
	}

	public String getUserFieldSwitchA() {
		return userFieldSwitchA;
	}

	public String getUserFieldSwitchB() {
		return userFieldSwitchB;
	}

	public String getUserFieldSwitchC() {
		return userFieldSwitchC;
	}

	public String getUserFieldText25() {
		return userFieldText25;
	}

	public String getUserFieldText40() {
		return userFieldText40;
	}

	public void retrieveRecord(String fromEnv) throws SQLException {
		String fileEnv = " ";
		if (fromEnv == "7M") { 
			fileEnv = " ";
		} else {
			fileEnv = fromEnv.substring(1);
		}
		StringBuilder sql = new StringBuilder("SELECT * FROM AMFLIB").append(fileEnv)
				.append(".ITMRVBL0 WHERE STIDAL = '").append(
				site).append("' and ITNOAL = '").append(item).append(
				"' and ITRVAL = '").append(revision).append("'");
		Connection conn = Factory.getConnection();
		Statement st = conn.createStatement();
		ResultSet rec = st.executeQuery(sql.toString());
		if (rec.next()) {
			setSite(rec.getString("STIDAL"));
			setItem(rec.getString("ITNOAL"));
			setRevision(rec.getString("ITRVAL"));
			setCostTechniqueCode(rec.getString("CTCHAL"));
			setCurrentCostStatusCode(rec.getString("CCSCAL"));
			setCurrentManufacturingOverheadLowerLevels(rec.getString("COHLAL"	));
			setCurrentManufacturingOverheadTableCode(rec.getString("COHCAL"));
			setCurrentManufacturingOverheadThisLevel(rec.getString("COHTAL"));
			setCurrentManufacturingOverheadThisLevelDateLastMaintained(rec.getString("COHMAL"));
			setCurrentMaterialLowerLevels(rec.getString("CMALAL"));
			setCurrentMaterialThisLevel(rec.getString("CMATAL"));
			setCurrentMaterialThisLevelDateLastMaintained(rec.getString("CMAMAL"));
			setCurrentOther1LowerLevels(rec.getString("CO1LAL"));
			setCurrentOther1ThisLevel(rec.getString("CO1TAL"));
			setCurrentOther1ThisLevelDateLastMaintained(rec.getString("CO1MAL"));
			setCurrentOther2LowerLevels(rec.getString("CO2LAL"));
			setCurrentOther2ThisLevel(rec.getString("CO2TAL"));
			setCurrentOther2ThisLevelDateLastMaintained(rec.getString("CO2MAL"));
			setCurrentOther3LowerLevels(rec.getString("CO3LAL"));
			setCurrentOther3ThisLevel(rec.getString("CO3TAL"));
			setCurrentOther3ThisLevelDateLastMaintained(rec.getString("CO3MAL"));
			setCurrentOther4LowerLevels(rec.getString("CO4LAL"));
			setCurrentOther4ThisLevel(rec.getString("CO4TAL"));
			setCurrentOther4ThisLevelDateLastMaintained(rec.getString("CO4MAL"));
			setCurrentOutsideOperationsLowerLevels(rec.getString("COOLAL"));
			setCurrentOutsideOperationsThisLevel(rec.getString("COOTAL"));
			setCurrentOutsideOperationsThisLevelDateLastMaintained(rec.getString("COOMAL"));
			setCurrentPurchaseOverheadLowerLevels(rec.getString("CPOLAL"));
/*			setCurrentPurchaseOverheadTableCode(rec.getString("CPTAAL"));  */
			setCurrentPurchaseOverheadTableCode(" ");
			setCurrentPurchaseOverheadThisLevel(rec.getString("CPOTAL"));
			setCurrentRunLaborLowerLevels(rec.getString("CRLLAL"));
			setCurrentRunLaborTableCode(rec.getString("CRLCAL"));
			setCurrentRunLaborThisLevel(rec.getString("CRLTAL"));
			setCurrentRunLaborThisLevelDateLastMaintained(rec.getString("CRLMAL"));
			setCurrentRunMachineLowerLevels(rec.getString("CRMLAL"));
			setCurrentRunMachineThisLevel(rec.getString("CRMTAL"));
			setCurrentRunMachineThisLevelDateLastMaintained(rec.getString("CRMMAL"));
			setCurrentSetupCostLot(rec.getString("CSULAL"));
			setCurrentSetupLaborLowerLevels(rec.getString("CSLLAL"));
			setCurrentSetupLaborThisLevel(rec.getString("CSLTAL"));
			setCurrentSetupLaborThisLevelDateLastMaintained(rec.getString("CSLMAL"));
			setCurrentSetupMachineLowerLevels(rec.getString("CSMLAL"));
			setCurrentSetupMachineThisLevel(rec.getString("CSMTAL"));
			setCurrentSetupMachineThisLevelDateLastMaintained(rec.getString("CSMMAL"));
			setCurrentUnitCost(rec.getString("UCCTAL"));
			setLaborHours(rec.getString("LBHRAL"));
			setLastCurrentCostedDate(rec.getString("DLCCAL"));
			setLastStandardCostedDate(rec.getString("DLCSAL"));
			setMethodCurrentCostsLastGenerated(rec.getString("MLCCAL"));
			setMethodStandardCostsLastGenerated(rec.getString("MLCSAL"));
			setRecostFlag(rec.getString("RCSTAL"));
			setStandardCostStatusCode(rec.getString("SCSCAL"));
			setStandardLotSize(rec.getString("LTSZAL"));
			setStandardManufacturingOverheadLowerLevels(rec.getString("SOHLAL"));
			setStandardManufacturingOverheadTableCode(rec.getString("SOHCAL"));
			setStandardManufacturingOverheadThisLevel(rec.getString("SOHTAL"));
			setStandardManufacturingOverheadThisLevelDateLastMaintained(rec.getString("SOHMAL"));
			setStandardMaterialLowerLevels(rec.getString("SMALAL"));
			setStandardMaterialThisLevel(rec.getString("SMATAL"));
			setStandardMaterialThisLevelDateLastMaintained(rec.getString("SMAMAL"));
			setStandardOther1LowerLevels(rec.getString("SO1LAL"));
			setStandardOther1ThisLevel(rec.getString("SO1TAL"));
			setStandardOther1ThisLevelDateLastMaintained(rec.getString("SO1MAL"));
			setStandardOther2LowerLevels(rec.getString("SO2LAL"));
			setStandardOther2ThisLevel(rec.getString("SO2TAL"));
			setStandardOther2ThisLevelDateLastMaintained(rec.getString("SO2MAL"));
			setStandardOther3LowerLevels(rec.getString("SO3LAL"));
			setStandardOther3ThisLevel(rec.getString("SO3TAL"));
			setStandardOther3ThisLevelDateLastMaintained(rec.getString("SO3MAL"));
			setStandardOther4LowerLevels(rec.getString("SO4LAL"));
			setStandardOther4ThisLevel(rec.getString("SO4TAL"));
			setStandardOther4ThisLevelDateLastMaintained(rec.getString("SO4MAL"));
			setStandardOutsideOperationsLowerLevels(rec.getString("SOOLAL"));
			setStandardOutsideOperationsThisLevel(rec.getString("SOOTAL"));
			setStandardOutsideOperationsThisLevelDateLastMaintained(rec.getString("SOOMAL"));
			setStandardPurchaseOverheadLowerLevels(rec.getString("SPOLAL"));
/*			setStandardPurchaseOverheadTableCode(rec.getString("SPTAAL"));  */
			setStandardPurchaseOverheadTableCode(" ");
			setStandardPurchaseOverheadThisLevel(rec.getString("SPOTAL"));
			setStandardRunLaborLowerLevels(rec.getString("SRLLAL"));
			setStandardRunLaborTableCode(rec.getString("SRLCAL"));
			setStandardRunLaborThisLevel(rec.getString("SRLTAL"));
			setStandardRunLaborThisLevelDateLastMaintained(rec.getString("SRLMAL"));
			setStandardRunMachineLowerLevels(rec.getString("SRMLAL"));
			setStandardRunMachineThisLevel(rec.getString("SRMTAL"));
			setStandardRunMachineThisLevelDateLastMaintained(rec.getString("SRMMAL"));
			setStandardSetupLaborLowerLevels(rec.getString("SSLLAL"));
			setStandardSetupLaborThisLevel(rec.getString("SSLTAL"));
			setStandardSetupLaborThisLevelDateLastMaintained(rec.getString("SSLMAL"));
			setStandardSetupMachineLowerLevels(rec.getString("SSMLAL"));
			setStandardSetupMachineThisLevel(rec.getString("SSMTAL"));
			setStandardSetupMachineThisLevelDateLastMaintained(rec.getString("SSMMAL"));
			setStandardUnitCost(rec.getString("UCSTAL"));
			setUserFieldAmount1(rec.getString("UUA1AL"));
			setUserFieldCodeA(rec.getString("UUCAAL"));
			setUserFieldCodeB(rec.getString("UUCBAL"));
			setUserFieldCodeC(rec.getString("UUCCAL"));
			setUserFieldDate1(rec.getString("UUD1AL"));
			setUserFieldQuantity1(rec.getString("UUQ1AL"));
			setUserFieldSwitchA(rec.getString("UUSAAL"));
			setUserFieldSwitchB(rec.getString("UUSBAL"));
			setUserFieldSwitchC(rec.getString("UUSCAL"));
			setUserFieldText40(rec.getString("UU40AL"));
		}
		rec.close();
		st.close();
		Factory.freeConnection(conn);
	}

	public void setCostTechniqueCode(String costTechniqueCode) {
		this.costTechniqueCode = costTechniqueCode;
	}

	public void setCurrentCostStatusCode(String currentCostStatusCode) {
		this.currentCostStatusCode = currentCostStatusCode;
	}

	public void setCurrentManufacturingOverheadLowerLevels(
			String currentManufacturingOverheadLowerLevels) {
		this.currentManufacturingOverheadLowerLevels = currentManufacturingOverheadLowerLevels;
	}

	public void setCurrentManufacturingOverheadTableCode(
			String currentManufacturingOverheadTableCode) {
		this.currentManufacturingOverheadTableCode = currentManufacturingOverheadTableCode;
	}

	public void setCurrentManufacturingOverheadThisLevel(
			String currentManufacturingOverheadThisLevel) {
		this.currentManufacturingOverheadThisLevel = currentManufacturingOverheadThisLevel;
	}

	public void setCurrentManufacturingOverheadThisLevelDateLastMaintained(
			String currentManufacturingOverheadThisLevelDateLastMaintained) {
		this.currentManufacturingOverheadThisLevelDateLastMaintained = currentManufacturingOverheadThisLevelDateLastMaintained;
	}

	public void setCurrentMaterialLowerLevels(String currentMaterialLowerLevels) {
		this.currentMaterialLowerLevels = currentMaterialLowerLevels;
	}

	public void setCurrentMaterialThisLevel(String currentMaterialThisLevel) {
		this.currentMaterialThisLevel = currentMaterialThisLevel;
	}

	public void setCurrentMaterialThisLevelDateLastMaintained(
			String currentMaterialThisLevelDateLastMaintained) {
		this.currentMaterialThisLevelDateLastMaintained = currentMaterialThisLevelDateLastMaintained;
	}

	public void setCurrentOther1LowerLevels(String currentOther1LowerLevels) {
		this.currentOther1LowerLevels = currentOther1LowerLevels;
	}

	public void setCurrentOther1ThisLevel(String currentOther1ThisLevel) {
		this.currentOther1ThisLevel = currentOther1ThisLevel;
	}

	public void setCurrentOther1ThisLevelDateLastMaintained(
			String currentOther1ThisLevelDateLastMaintained) {
		this.currentOther1ThisLevelDateLastMaintained = currentOther1ThisLevelDateLastMaintained;
	}

	public void setCurrentOther2LowerLevels(String currentOther2LowerLevels) {
		this.currentOther2LowerLevels = currentOther2LowerLevels;
	}

	public void setCurrentOther2ThisLevel(String currentOther2ThisLevel) {
		this.currentOther2ThisLevel = currentOther2ThisLevel;
	}

	public void setCurrentOther2ThisLevelDateLastMaintained(
			String currentOther2ThisLevelDateLastMaintained) {
		this.currentOther2ThisLevelDateLastMaintained = currentOther2ThisLevelDateLastMaintained;
	}

	public void setCurrentOther3LowerLevels(String currentOther3LowerLevels) {
		this.currentOther3LowerLevels = currentOther3LowerLevels;
	}

	public void setCurrentOther3ThisLevel(String currentOther3ThisLevel) {
		this.currentOther3ThisLevel = currentOther3ThisLevel;
	}

	public void setCurrentOther3ThisLevelDateLastMaintained(
			String currentOther3ThisLevelDateLastMaintained) {
		this.currentOther3ThisLevelDateLastMaintained = currentOther3ThisLevelDateLastMaintained;
	}

	public void setCurrentOther4LowerLevels(String currentOther4LowerLevels) {
		this.currentOther4LowerLevels = currentOther4LowerLevels;
	}

	public void setCurrentOther4ThisLevel(String currentOther4ThisLevel) {
		this.currentOther4ThisLevel = currentOther4ThisLevel;
	}

	public void setCurrentOther4ThisLevelDateLastMaintained(
			String currentOther4ThisLevelDateLastMaintained) {
		this.currentOther4ThisLevelDateLastMaintained = currentOther4ThisLevelDateLastMaintained;
	}

	public void setCurrentOutsideOperationsLowerLevels(
			String currentOutsideOperationsLowerLevels) {
		this.currentOutsideOperationsLowerLevels = currentOutsideOperationsLowerLevels;
	}

	public void setCurrentOutsideOperationsThisLevel(
			String currentOutsideOperationsThisLevel) {
		this.currentOutsideOperationsThisLevel = currentOutsideOperationsThisLevel;
	}

	public void setCurrentOutsideOperationsThisLevelDateLastMaintained(
			String currentOutsideOperationsThisLevelDateLastMaintained) {
		this.currentOutsideOperationsThisLevelDateLastMaintained = currentOutsideOperationsThisLevelDateLastMaintained;
	}

	public void setCurrentPurchaseOverheadLowerLevels(
			String currentPurchaseOverheadLowerLevels) {
		this.currentPurchaseOverheadLowerLevels = currentPurchaseOverheadLowerLevels;
	}

	public void setCurrentPurchaseOverheadTableCode(
			String currentPurchaseOverheadTableCode) {
		this.currentPurchaseOverheadTableCode = currentPurchaseOverheadTableCode;
	}

	public void setCurrentPurchaseOverheadThisLevel(
			String currentPurchaseOverheadThisLevel) {
		this.currentPurchaseOverheadThisLevel = currentPurchaseOverheadThisLevel;
	}

	public void setCurrentRunLaborLowerLevels(String currentRunLaborLowerLevels) {
		this.currentRunLaborLowerLevels = currentRunLaborLowerLevels;
	}

	public void setCurrentRunLaborTableCode(String currentRunLaborTableCode) {
		this.currentRunLaborTableCode = currentRunLaborTableCode;
	}

	public void setCurrentRunLaborThisLevel(String currentRunLaborThisLevel) {
		this.currentRunLaborThisLevel = currentRunLaborThisLevel;
	}

	public void setCurrentRunLaborThisLevelDateLastMaintained(
			String currentRunLaborThisLevelDateLastMaintained) {
		this.currentRunLaborThisLevelDateLastMaintained = currentRunLaborThisLevelDateLastMaintained;
	}

	public void setCurrentRunMachineLowerLevels(String currentRunMachineLowerLevels) {
		this.currentRunMachineLowerLevels = currentRunMachineLowerLevels;
	}

	public void setCurrentRunMachineThisLevel(String currentRunMachineThisLevel) {
		this.currentRunMachineThisLevel = currentRunMachineThisLevel;
	}

	public void setCurrentRunMachineThisLevelDateLastMaintained(
			String currentRunMachineThisLevelDateLastMaintained) {
		this.currentRunMachineThisLevelDateLastMaintained = currentRunMachineThisLevelDateLastMaintained;
	}

	public void setCurrentSetupCostLot(String currentSetupCostLot) {
		this.currentSetupCostLot = currentSetupCostLot;
	}

	public void setCurrentSetupLaborLowerLevels(String currentSetupLaborLowerLevels) {
		this.currentSetupLaborLowerLevels = currentSetupLaborLowerLevels;
	}

	public void setCurrentSetupLaborTableCode(String currentSetupLaborTableCode) {
		this.currentSetupLaborTableCode = currentSetupLaborTableCode;
	}

	public void setCurrentSetupLaborThisLevel(String currentSetupLaborThisLevel) {
		this.currentSetupLaborThisLevel = currentSetupLaborThisLevel;
	}

	public void setCurrentSetupLaborThisLevelDateLastMaintained(
			String currentSetupLaborThisLevelDateLastMaintained) {
		this.currentSetupLaborThisLevelDateLastMaintained = currentSetupLaborThisLevelDateLastMaintained;
	}

	public void setCurrentSetupMachineLowerLevels(
			String currentSetupMachineLowerLevels) {
		this.currentSetupMachineLowerLevels = currentSetupMachineLowerLevels;
	}

	public void setCurrentSetupMachineThisLevel(String currentSetupMachineThisLevel) {
		this.currentSetupMachineThisLevel = currentSetupMachineThisLevel;
	}

	public void setCurrentSetupMachineThisLevelDateLastMaintained(
			String currentSetupMachineThisLevelDateLastMaintained) {
		this.currentSetupMachineThisLevelDateLastMaintained = currentSetupMachineThisLevelDateLastMaintained;
	}

	public void setCurrentUnitCost(String currentUnitCost) {
		this.currentUnitCost = currentUnitCost;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public void setLaborHours(String laborHours) {
		this.laborHours = laborHours;
	}

	public void setLastCurrentCostedDate(String lastCurrentCostedDate) {
		this.lastCurrentCostedDate = lastCurrentCostedDate;
	}

	public void setLastStandardCostedDate(String lastStandardCostedDate) {
		this.lastStandardCostedDate = lastStandardCostedDate;
	}

	public void setMethodCurrentCostsLastGenerated(
			String methodCurrentCostsLastGenerated) {
		this.methodCurrentCostsLastGenerated = methodCurrentCostsLastGenerated;
	}

	public void setMethodStandardCostsLastGenerated(
			String methodStandardCostsLastGenerated) {
		this.methodStandardCostsLastGenerated = methodStandardCostsLastGenerated;
	}

	public void setRecostFlag(String recostFlag) {
		this.recostFlag = recostFlag;
	}

	public void setRevision(String revision) {
		this.revision = revision;
	}

	public void setSite(String site) {
		this.site = site;
	}

	public void setStandardCostStatusCode(String standardCostStatusCode) {
		this.standardCostStatusCode = standardCostStatusCode;
	}

	public void setStandardLotSize(String standardLotSize) {
		this.standardLotSize = standardLotSize;
	}

	public void setStandardManufacturingOverheadDateThisLevelLastMaintained(
			String standardManufacturingOverheadDateThisLevelLastMaintained) {
		this.standardManufacturingOverheadThisLevelDateLastMaintained = standardManufacturingOverheadDateThisLevelLastMaintained;
	}

	public void setStandardManufacturingOverheadLowerLevels(
			String standardManufacturingOverheadLowerLevels) {
		this.standardManufacturingOverheadLowerLevels = standardManufacturingOverheadLowerLevels;
	}

	public void setStandardManufacturingOverheadTableCode(
			String standardManufacturingOverheadTableCode) {
		this.standardManufacturingOverheadTableCode = standardManufacturingOverheadTableCode;
	}

	public void setStandardManufacturingOverheadThisLevel(
			String standardManufacturingOverheadThisLevel) {
		this.standardManufacturingOverheadThisLevel = standardManufacturingOverheadThisLevel;
	}

	public void setStandardManufacturingOverheadThisLevelDateLastMaintained(
			String standardManufacturingOverheadThisLevelDateLastMaintained) {
		this.standardManufacturingOverheadThisLevelDateLastMaintained = standardManufacturingOverheadThisLevelDateLastMaintained;
	}

	public void setStandardMaterialLowerLevels(String standardMaterialLowerLevels) {
		this.standardMaterialLowerLevels = standardMaterialLowerLevels;
	}

	public void setStandardMaterialThisLevel(String standardMaterialThisLevel) {
		this.standardMaterialThisLevel = standardMaterialThisLevel;
	}

	public void setStandardMaterialThisLevelDateLastMaintained(
			String standardMaterialThisLevelDateLastMaintained) {
		this.standardMaterialThisLevelDateLastMaintained = standardMaterialThisLevelDateLastMaintained;
	}

	public void setStandardOther1LowerLevels(String standardOther1LowerLevels) {
		this.standardOther1LowerLevels = standardOther1LowerLevels;
	}

	public void setStandardOther1ThisLevel(String standardOther1ThisLevel) {
		this.standardOther1ThisLevel = standardOther1ThisLevel;
	}

	public void setStandardOther1ThisLevelDateLastMaintained(
			String standardOther1ThisLevelDateLastMaintained) {
		this.standardOther1ThisLevelDateLastMaintained = standardOther1ThisLevelDateLastMaintained;
	}

	public void setStandardOther2LowerLevels(String standardOther2LowerLevels) {
		this.standardOther2LowerLevels = standardOther2LowerLevels;
	}

	public void setStandardOther2ThisLevel(String standardOther2ThisLevel) {
		this.standardOther2ThisLevel = standardOther2ThisLevel;
	}

	public void setStandardOther2ThisLevelDateLastMaintained(
			String standardOther2ThisLevelDateLastMaintained) {
		this.standardOther2ThisLevelDateLastMaintained = standardOther2ThisLevelDateLastMaintained;
	}

	public void setStandardOther3LowerLevels(String standardOther3LowerLevels) {
		this.standardOther3LowerLevels = standardOther3LowerLevels;
	}

	public void setStandardOther3ThisLevel(String standardOther3ThisLevel) {
		this.standardOther3ThisLevel = standardOther3ThisLevel;
	}

	public void setStandardOther3ThisLevelDateLastMaintained(
			String standardOther3ThisLevelDateLastMaintained) {
		this.standardOther3ThisLevelDateLastMaintained = standardOther3ThisLevelDateLastMaintained;
	}

	public void setStandardOther4LowerLevels(String standardOther4LowerLevels) {
		this.standardOther4LowerLevels = standardOther4LowerLevels;
	}

	public void setStandardOther4ThisLevel(String standardOther4ThisLevel) {
		this.standardOther4ThisLevel = standardOther4ThisLevel;
	}

	public void setStandardOther4ThisLevelDateLastMaintained(
			String standardOther4ThisLevelDateLastMaintained) {
		this.standardOther4ThisLevelDateLastMaintained = standardOther4ThisLevelDateLastMaintained;
	}

	public void setStandardOutsideOperations(String standardOutsideOperations) {
		this.standardOutsideOperations = standardOutsideOperations;
	}

	public void setStandardOutsideOperationsLowerLevels(
			String standardOutsideOperationsLowerLevels) {
		this.standardOutsideOperationsLowerLevels = standardOutsideOperationsLowerLevels;
	}

	public void setStandardOutsideOperationsThisLevel(
			String standardOutsideOperationsThisLevel) {
		this.standardOutsideOperationsThisLevel = standardOutsideOperationsThisLevel;
	}

	public void setStandardOutsideOperationsThisLevelDateLastMaintained(
			String standardOutsideOperationsThisLevelDateLastMaintained) {
		this.standardOutsideOperationsThisLevelDateLastMaintained = standardOutsideOperationsThisLevelDateLastMaintained;
	}

	public void setStandardPurchaseOverheadLowerLevels(
			String standardPurchaseOverheadLowerLevels) {
		this.standardPurchaseOverheadLowerLevels = standardPurchaseOverheadLowerLevels;
	}

	public void setStandardPurchaseOverheadTableCode(
			String standardPurchaseOverheadTableCode) {
		this.standardPurchaseOverheadTableCode = standardPurchaseOverheadTableCode;
	}

	public void setStandardPurchaseOverheadThisLevel(
			String standardPurchaseOverheadThisLevel) {
		this.standardPurchaseOverheadThisLevel = standardPurchaseOverheadThisLevel;
	}

	public void setStandardRunLaborLowerLevels(String standardRunLaborLowerLevels) {
		this.standardRunLaborLowerLevels = standardRunLaborLowerLevels;
	}

	public void setStandardRunLaborTableCode(String standardRunLaborTableCode) {
		this.standardRunLaborTableCode = standardRunLaborTableCode;
	}

	public void setStandardRunLaborThisLevel(String standardRunLaborThisLevel) {
		this.standardRunLaborThisLevel = standardRunLaborThisLevel;
	}

	public void setStandardRunLaborThisLevelDateLastMaintained(
			String standardRunLaborThisLevelDateLastMaintained) {
		this.standardRunLaborThisLevelDateLastMaintained = standardRunLaborThisLevelDateLastMaintained;
	}

	public void setStandardRunMachineLowerLevels(
			String standardRunMachineLowerLevels) {
		this.standardRunMachineLowerLevels = standardRunMachineLowerLevels;
	}

	public void setStandardRunMachineThisLevel(String standardRunMachineThisLevel) {
		this.standardRunMachineThisLevel = standardRunMachineThisLevel;
	}

	public void setStandardRunMachineThisLevelDateLastMaintained(
			String standardRunMachineThisLevelDateLastMaintained) {
		this.standardRunMachineThisLevelDateLastMaintained = standardRunMachineThisLevelDateLastMaintained;
	}

	public void setStandardSetupCostLot(String standardSetupCostLot) {
		this.standardSetupCostLot = standardSetupCostLot;
	}

	public void setStandardSetupLaborLowerLevels(
			String standardSetupLaborLowerLevels) {
		this.standardSetupLaborLowerLevels = standardSetupLaborLowerLevels;
	}

	public void setStandardSetupLaborTableCode(String standardSetupLaborTableCode) {
		this.standardSetupLaborTableCode = standardSetupLaborTableCode;
	}

	public void setStandardSetupLaborThisLevel(String standardSetupLaborThisLevel) {
		this.standardSetupLaborThisLevel = standardSetupLaborThisLevel;
	}

	public void setStandardSetupLaborThisLevelDateLastMaintained(
			String standardSetupLaborThisLevelDateLastMaintained) {
		this.standardSetupLaborThisLevelDateLastMaintained = standardSetupLaborThisLevelDateLastMaintained;
	}

	public void setStandardSetupMachineLowerLevels(
			String standardSetupMachineLowerLevels) {
		this.standardSetupMachineLowerLevels = standardSetupMachineLowerLevels;
	}

	public void setStandardSetupMachineThisLevel(
			String standardSetupMachineThisLevel) {
		this.standardSetupMachineThisLevel = standardSetupMachineThisLevel;
	}

	public void setStandardSetupMachineThisLevelDateLastMaintained(
			String standardSetupMachineThisLevelDateLastMaintained) {
		this.standardSetupMachineThisLevelDateLastMaintained = standardSetupMachineThisLevelDateLastMaintained;
	}

	public void setStandardUnitCost(String standardUnitCost) {
		this.standardUnitCost = standardUnitCost;
	}

	public void setUserFieldAmount1(String userFieldAmount1) {
		this.userFieldAmount1 = userFieldAmount1;
	}

	public void setUserFieldCodeA(String userFieldCodeA) {
		this.userFieldCodeA = userFieldCodeA;
	}

	public void setUserFieldCodeB(String userFieldCodeB) {
		this.userFieldCodeB = userFieldCodeB;
	}

	public void setUserFieldCodeC(String userFieldCodeC) {
		this.userFieldCodeC = userFieldCodeC;
	}

	public void setUserFieldCurrencyA(String userFieldCurrencyA) {
		this.userFieldCurrencyA = userFieldCurrencyA;
	}

	public void setUserFieldDate1(String userFieldDate1) {
		this.userFieldDate1 = userFieldDate1;
	}

	public void setUserFieldQuantity1(String userFieldQuantity1) {
		this.userFieldQuantity1 = userFieldQuantity1;
	}

	public void setUserFieldSwitchA(String userFieldSwitchA) {
		this.userFieldSwitchA = userFieldSwitchA;
	}

	public void setUserFieldSwitchB(String userFieldSwitchB) {
		this.userFieldSwitchB = userFieldSwitchB;
	}

	public void setUserFieldSwitchC(String userFieldSwitchC) {
		this.userFieldSwitchC = userFieldSwitchC;
	}

	public void setUserFieldText25(String userFieldText25) {
		this.userFieldText25 = userFieldText25;
	}

	public void setUserFieldText40(String userFieldText40) {
		this.userFieldText40 = userFieldText40;
	}


}